package com.atguigu.gulimall.ware.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("galimall-gateway")
public interface ProductFeignService {

    /**
     *   不直接调用服务提供者的ip，而是通过网关，间接调用！！！
     *   @FeignClient("galimall-gateway")：给网关服务发请求
     *   @RequestMapping("/api/product/skuinfo/info/{skuId}"
     * @param skuId
     * @return
     */
    @RequestMapping("/api/product/skuinfo/info/{skuId}")
    public R info(@PathVariable("skuId") Long skuId);

}
